package com.easy.west.westclient.api.meeting.api;

import com.easy.west.westclient.api.base.bean.SuccessBean;
import com.easy.west.westclient.api.meeting.bean.MeetRoomList;
import com.easy.west.westclient.api.meeting.bean.OrderedMeetingBean;

import retrofit2.Call;
import retrofit2.http.Field;
import retrofit2.http.FormUrlEncoded;
import retrofit2.http.GET;
import retrofit2.http.POST;
import retrofit2.http.Path;

/**
 * 请求
 * Created by xiatao on 2018/8/20.
 */

public interface MeetingService
{
    /***
     * 查询相关会议室
     * @param date 时间
     * @param selectime 时区范围
     * @param size 大小
     * @param vip 是否是vip
     * @return
     */
    @GET("meetingorders/findbytime/{selectdate}/{selecttime}/{size}/{vip}")
    Call<MeetRoomList> findMeetingRoomBy(@Path("selectdate")String date,@Path("selecttime")int selectime,@Path("size")int size,
                                         @Path("vip")boolean vip);

    /**
     * 预约会议室
     * @param mrid
     * @param title
     * @param selectdate
     * @param selecttime
     * @param uid
     * @param departmentid
     * @param number
     * @param leader
     * @param starttime
     * @param sit_card
     * @param meeting_flag
     * @param ispravite
     * @param privatereason
     * @param equipment
     * @return
     */
    @FormUrlEncoded
    @POST("meetingorders/order")
    Call<SuccessBean> orderMeeting(@Field("mrid") long mrid,
                                   @Field("title") String title,
                                   @Field("selectdate") String selectdate,
                                   @Field("selecttime") int selecttime,
                                   @Field("uid") long uid,
                                   @Field("departmentid") long departmentid,
                                   @Field("number")int number,
                                   @Field("leader") String leader,
                                   @Field("starttime") String starttime,
                                   @Field("seat_card") String sit_card,
                                   @Field("Huibiao_info") String meeting_flag,
                                   @Field("isPrivate") boolean ispravite,
                                   @Field("PrivateReason") String privatereason,
                                   @Field("equipment") String equipment,
    @Field("phonenum")String phoneum
    ,@Field("u_name")String u_name);

    /**
     * 查询预约会议室实体
     * @param mlid
     * @return
     */
    @GET("meetingorders/{mlid}")
    Call<OrderedMeetingBean> findorderedMeeting(@Path("mlid")long mlid);
}
